package com.example.orderform.lmpl;

import com.example.orderform.dao.AllOrderMapper;
import com.example.orderform.server.AllOrderServer;

import com.example.orderform.vo.ADDress;
import com.example.orderform.vo.Order;
import com.example.orderform.vo.Shi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

@Service
public class AllOrderLmpl implements AllOrderServer {

    @Autowired
    AllOrderMapper mapper;


    @Override
    public List<Order> syselectorder(int userid, int q, int j) {
        return mapper.syselectorder(userid, q, j);
    }

    @Override
    public int he(int userid) {
        return mapper.he(userid);
    }

    @Override
    public int update(int orderid) {
        return mapper.update(orderid);
    }

    @Override
    public List<Order> mohuselect(String orderstatus,int userid) {
        return mapper.mohuselect(orderstatus,userid);
    }

    @Override
    public int orderinsert(int userid, int spid, String ordernumber, Date undertime, String payway, Date paytime, String logisticscompany, String couriernumber, String orderstatus, String comitydescription, double comityprices, int comitynumber, String comitypicture, double Settlementprice, String addressinformation, String freight, double actualpayment, String preferentialinformation, String deletestate, String specifications, String statusbutton, String statusbuttonunder, String consignee, String telephone) {

        return mapper.orderinsert(userid, spid, ordernumber, undertime, payway, paytime, logisticscompany, couriernumber, orderstatus, comitydescription, comityprices, comitynumber, comitypicture, Settlementprice, addressinformation, freight, actualpayment, preferentialinformation, deletestate, specifications, statusbutton, statusbuttonunder, consignee, telephone);
    }

    @Override
    public List<Order> selbyorder(String undertime, String ordernumber) {
        return mapper.selbyorder(undertime,ordernumber);
    }

    @Override
    public ADDress address(int addressid) {
        return mapper.address(addressid);
    }

//    @Override
//    public List<Shi> shi() {
//        return mapper.shi();
//    }
//
//    @Override
//    public int shuh(int shu) {
//        return mapper.shuh(shu);
//    }
}
